
import { Resource, invoke } from '@tauri-apps/api/core';

import { ConnectorDataSource } from '../connector';

export const extractorMetaFromDataSource = async (dataSource: ConnectorDataSource, options?: any): Promise<any> => {

    if (!dataSource.protocol) {
        dataSource.protocol = dataSource.database_type;
    }
    let res: any = await invoke('plugin:mg-platform|extractor_meta_from_database', {
        dataSource: dataSource,
        options: options ? options : {}
    });
    console.log(res);
    return res;
}

export default {}